#include <opencv2\opencv.hpp>
using namespace cv;
int main()
{
	Mat img = imread("adaptiveThreshold.jpg",0);
	Mat thresh1, thresh2, thresh3;
	threshold(img, thresh1, 127, 255, THRESH_BINARY);
	adaptiveThreshold(img, thresh2,255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY, 11, 2);
	adaptiveThreshold(img, thresh3,255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 11, 2);

	imshow("Original Image", img);
	imshow("BINARY", thresh1);
	imshow("ADAPTIVE_THRESH_MEAN_C", thresh2);
	imshow("ADAPTIVE_THRESH_GAUSSIAN_C", thresh3);
	waitKey(0);
	return 0;
}